home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mc51bugs
/
q31792
< prev
next >
Wrap
Text File
|
1989-03-08
|
3KB
|
85 lines
Q31792 Application Note for the Printf() Function
Microsoft C Compiler
5.10 | 5.10
MS-DOS | OS/2
Summary:
The following application note contains replacement object files to
correct a problem with formatted output in the Microsoft C Compiler
Version 5.10 run time. Specifically, the printf family of functions
would not zero fill floating-point numbers when the specified
precision is zero. This problem occurs with printf(), cprintf(),
sprintf(), fprintf(), vprintf(), vfprintf(), and vsprintf() functions.
This update corrects the problem with all of these functions.
This problem is demonstrated in the following example:
#include <stdio.h>
main(void)
{
printf("%04.0f\n", 12.34);
}
The current run-time library will output ' 12'. With this update, the
library will output '0012'.
More Information:
The following is a list of the files on the application note:
README.DOC This file
UPDATE.BAT DOS batch file to update all libraries
UPDATE.CMD OS/2 batch file to update all libraries
OUTPUT.S OUTPUT.OBJ for small-model libraries
OUTPUT.M OUTPUT.OBJ for medium-model libraries
OUTPUT.C OUTPUT.OBJ for compact-model libraries
OUTPUT.L OUTPUT.OBJ for large-model libraries
OUTPUT.CRT OUTPUT.OBJ for CDLLOBJS.LIB
OUTPUT.DLL OUTPUT.OBJ for LLIBCDLL.LIB
OUTPUT.MT OUTPUT.OBJ for LLIBCMT.LIB
CPRINTF.S CPRINTF.OBJ for small-model libraries
CPRINTF.M CPRINTF.OBJ for medium-model libraries
CPRINTF.C CPRINTF.OBJ for compact-model libraries
CPRINTF.L CPRINTF.OBJ for large-model libraries
CPRINTF.CRT CPRINTF.OBJ for CDLLOBJS.LIB
CPRINTF.DLL CPRINTF.OBJ for LLIBCDLL.LIB
CPRINTF.MT CPRINTF.OBJ for LLIBCMT.LIB
To update your libraries, place the above files in the same directory
as the libraries and type UPDATE. This process may take some time
depending on the number of libraries you created during installation.
The update procedure will create a backup of each library with the
file extension .BAK. After you assure yourself that the update was
completed without error (i.e., insufficient disk space), delete the
backups. The original combined libraries always can be regenerated
with the SETUP program and the distribution disks.
This file can be found in the Software Library by searching for the
filename, the Q number, or S12014. This application note also is
available from Microsoft Product Support Services by calling (206)
454-2030.
Keywords: softlib appnote buglist5.10
Updated 89/03/08 13:53